﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="OrganizationList.aspx.cs" Inherits="OneMG.Phoenix.AdminSite.Views.Passport.OrganizationList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadStyles" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadScripts" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
<table style="width: 100%;" style="background-color: #D4D4D4" cellspacing="1">
        <tr>
            <td style="width: 200px" valign="top" id="tdTreeView" style="background-color: #FFFFFF;">
                <asp:TreeView ID="trvOrg" runat="server" BorderColor="Transparent" BackColor="Transparent"
                    CssClass="treemenu" ShowLines="True" SelectedNodeStyle-BackColor="Cyan" OnSelectedNodeChanged="trvOrg_SelectedNodeChanged">
                </asp:TreeView>
            </td>
            <td style="width: 12" align="left" valign="bottom" onclick="javascript:switchTree();"
                style="background-color: #FFFFFF;">
                <img alt="" id="imgSwitch" title="收缩/展开左侧树" style="cursor:pointer;" src="/Images/hide_tree.gif" />
            </td>
            <td valign="top" style="background-color: #FFFFFF;">
                <table width="100%" cellspacing="1" class="tableSubtitle">
                    <tr>
                        <td align="left">
                            <img src="/Images/icon_note.gif" alt="" />
                            <asp:Label ID="Label2" runat="server" Text="部门信息"></asp:Label>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td align="right" class="tdButton">
                            <asp:Button ID="btnAdd" runat="server" EnableViewState="false" Text="新增" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                            <asp:Label ID="lblMessage" runat="server" ForeColor="Red" EnableViewState="False"></asp:Label>
                        </td>
                    </tr>
                </table>
                <asp:GridView ID="dgResult" runat="server" AllowSorting="True" AllowPaging="false" DataKeyNames="OrgID"
                    AutoGenerateColumns="False" Style="position: static; width: 100%; height: 20px"
                    AllowCustomPaging="True" OnRowDeleting="dgResult_RowDeleting" OnSorting="dgResult_Sorting">
                    <Columns>
                        <asp:BoundField HeaderText="组织机构编号" DataField="OrgID" />
                        <asp:BoundField HeaderText="组织机构简称" DataField="OrgName" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:HyperLink ID="btnEdit" runat="server" NavigateUrl='<%# "OrganizationEdit.aspx?q=" + GetEncryptQueryString("Action=edit&OrgID=" + DataBinder.Eval(Container.DataItem,"OrgID")) %>'>编辑</asp:HyperLink>
                                <asp:LinkButton ID="btnDelete" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"OrgID") %>'
                                    CommandName="Delete" OnClientClick="javascript:return confirm('确实要删队该组织机构吗?');">删除</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <table width="100%" border="0" class="tablePager">
                    <tr>
                        <td style="width: 50%" align="left">
                            
                        </td>
                        <td style="width: 50%" align="right">
                           
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Scripts" runat="server">
<script type="text/javascript" language="javascript">
        function switchTree() {
            var tdTreeView = document.getElementById("tdTreeView");
            var img = document.getElementById("imgSwitch");
            if (tdTreeView.style.display == "none") // show
            {
                tdTreeView.style.display = "inline";
                img.src = "/Images/hide_tree.gif";
            }
            else {
                tdTreeView.style.display = "none";
                img.src = "/Images/show_tree.gif";
            }
        }
    </script>
</asp:Content>
